import request from '@/utils/request'

// 查询星巴克账号列表
export function listAccount(query) {
    return request({
        url: '/starbucks/account/list',
        method: 'get',
        params: query
    })
}

// 查询星巴克账号详细
export function getAccount(id) {
    return request({
        url: '/starbucks/account/' + id,
        method: 'get'
    })
}

// 新增星巴克账号
export function addAccount(data) {
    return request({
        url: '/starbucks/account',
        method: 'post',
        data: data
    })
}

// 修改星巴克账号
export function updateAccount(data) {
    return request({
        url: '/starbucks/account',
        method: 'put',
        data: data
    })
}

// 删除星巴克账号
export function delAccount(id) {
    return request({
        url: '/starbucks/account/' + id,
        method: 'delete'
    })
}

// 导如星巴克token
export function insertByToken(query) {
    return request({
        url: '/starbucks/account/insertByToken?token=' + query,
        method: 'post'
    })
}

// 更新星巴克token
export function updateInfo(query) {
    return request({
        url: '/starbucks/account/updateInfo',
        method: 'get',
        params: query
    })
}